﻿<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>jQueryHTML之remove()</title>
        <script src="js/jquery-3.6.1.min.js"></script>
		<style>
		div{
			width:200px;
			height:150px;
			border:1px solid silver;
			background-color:lightblue;
			margin-bottom:10px;
		}
		</style>
    </head>
    <body>
        <h3>jQueryHTML之remove()</h3>
        <hr>
        <div>
		    <h4>这是标题</h4>
			<p>这是段落。</p>
		</div>
        <button>remove()</button>
        <script>
            $(document).ready(function() {
				//按钮的点击事件：删除<div>元素
                $("button").click(function() {
					$("div").remove();				
                });
            });
        </script>
	</body>
</html>
